/*********************
* Author:Dzlua
* QQ:505544956
* time:2017/07/29
*/
#ifndef __EDUI_WNDCTRL_H__
#define __EDUI_WNDCTRL_H__

#include "Control.h"

EDUI_NAMESPACE_BEGIN

class EDUI_API WndCtrl : public Control
{
protected:
    WndCtrl();
    virtual ~WndCtrl();
public:
	static WndCtrl* GetInterface();
	virtual void Release();
    static WndCtrl* ToWndCtrl(Control* ctrl);
public:
    // it will create a window if wnd is nullptr.
    void SetWindow(IWindow *wnd = nullptr);
    IWindow* GetInsetWindow() const;
protected:
    virtual void SetVisible(bool bVisible) override;
    virtual bool SetRect(const Rect *rc) override;
    virtual void Render(IRender* render, const Rect* rc) override;
protected:
    IWindow *m_window;
};

EDUI_NAMESPACE_END

#endif